﻿function  $id(ele) {
    return  document.getElementById(ele);
}

function cancel() {
    $id("id_txt_content").innerHTML = "";
    $id("id_ipt_title").value = "";
    $id("id_ipt_user").value = "";
}

function add() {
    $id("id_ipt_add").disabled = true;
    var arr = new Array();
    arr[0] = $id("id_ipt_title").value;
    arr[1] = $id("id_txt_content").innerHTML;
    arr[2] = $id("id_ipt_user").value;
    arr[3] = getSelectItem("id_sel_sex").value;

    var ident = ns.Add(arr).value;
    alert(ident);
    if (ident.indexOf("成功") > -1) {
        cancel();
    }
    $id("id_ipt_add").disabled = false;
}